using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ConversionTools._ToGeodatabase
{
    /// <summary>
    /// <para>Feature Class To Feature Class</para>
    /// <para>Converts a feature class or feature layer to a feature class.</para>
    /// <para>将要素类或要素图层转换为要素类。</para>
    /// </summary>    
    [DisplayName("Feature Class To Feature Class")]
    public class FeatureClassToFeatureClass : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FeatureClassToFeatureClass()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The feature class or feature layer that will be converted.</para>
        /// <para>将要转换的要素类或要素图层。</para>
        /// </param>
        /// <param name="_out_path">
        /// <para>Output Location</para>
        /// <para>The location in which the output feature class will be created. This can be either a geodatabase or a folder. If the output location is a folder, the output will be a shapefile.</para>
        /// <para>将在其中创建输出要素类的位置。这可以是地理数据库或文件夹。如果输出位置是文件夹，则输出将是 shapefile。</para>
        /// </param>
        /// <param name="_out_name">
        /// <para>Output Name</para>
        /// <para>The name of the output feature class.</para>
        /// <para>输出要素类的名称。</para>
        /// </param>
        public FeatureClassToFeatureClass(object _in_features, object _out_path, object _out_name)
        {
            this._in_features = _in_features;
            this._out_path = _out_path;
            this._out_name = _out_name;
        }
        public override string ToolboxName => "Conversion Tools";

        public override string ToolName => "Feature Class To Feature Class";

        public override string CallName => "conversion.FeatureClassToFeatureClass";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainAttachments", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "preserveGlobalIds", "qualifiedFieldNames", "transferDomains", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_path, _out_name, _where_clause, _field_mapping, _config_keyword, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature class or feature layer that will be converted.</para>
        /// <para>将要转换的要素类或要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Location</para>
        /// <para>The location in which the output feature class will be created. This can be either a geodatabase or a folder. If the output location is a folder, the output will be a shapefile.</para>
        /// <para>将在其中创建输出要素类的位置。这可以是地理数据库或文件夹。如果输出位置是文件夹，则输出将是 shapefile。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_path { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output feature class.</para>
        /// <para>输出要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_name { get; set; }


        /// <summary>
        /// <para>Expression</para>
        /// <para>An SQL expression used to select a subset of features.</para>
        /// <para>用于选择要素子集的 SQL 表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _where_clause { get; set; } = null;


        /// <summary>
        /// <para>Field Map</para>
        /// <para><xdoc>
        ///   <para>Controls which attribute fields will be in the output. By default, all fields from the inputs will be included.</para>
        ///   <para>Fields can be added, deleted, renamed, and reordered, and you can change their properties.</para>
        ///   <para>Merge rules allow you to specify how values from two or more input fields are merged or combined into a single output value. There are several merge rules you can use to determine how the output field will be populated with values.
        ///   <bulletList>
        ///     <bullet_item>First—Use the input fields' first value.  </bullet_item><para/>
        ///     <bullet_item>Last—Use the input fields' last value.  </bullet_item><para/>
        ///     <bullet_item>Join—Concatenate (join) the input field values.  </bullet_item><para/>
        ///     <bullet_item>Sum—Calculate the total of the input field values.  </bullet_item><para/>
        ///     <bullet_item>Mean—Calculate the mean (average) of the input field values.  </bullet_item><para/>
        ///     <bullet_item>Median—Calculate the median (middle) of the input field values.  </bullet_item><para/>
        ///     <bullet_item>Mode—Use the value with the highest frequency.  </bullet_item><para/>
        ///     <bullet_item>Min—Use the minimum value of all the input field values.  </bullet_item><para/>
        ///     <bullet_item>Max—Use the maximum value of all the input field values.  </bullet_item><para/>
        ///     <bullet_item>Standard deviation—Use the standard deviation classification method on all the input field values.  </bullet_item><para/>
        ///     <bullet_item>Count—Find the number of records included in the calculation.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>控制输出中将包含哪些属性字段。默认情况下，将包含输入中的所有字段。</para>
        ///   <para>可以添加、删除、重命名和重新排序字段，并且可以更改其属性。</para>
        /// <para>合并规则允许您指定如何将两个或多个输入字段中的值合并或组合为单个输出值。您可以使用多个合并规则来确定如何使用值填充输出字段。
        ///   <bulletList>
        ///     <bullet_item>第一 - 使用输入字段的第一个值。</bullet_item><para/>
        ///     <bullet_item>最后 （Last） - 使用输入字段的最后一个值。</bullet_item><para/>
        ///     <bullet_item>连接 （Join） - 连接（连接）输入字段值。</bullet_item><para/>
        ///     <bullet_item>求和 （Sum） - 计算输入字段值的总和。</bullet_item><para/>
        ///     <bullet_item>均值 （Mean） - 计算输入字段值的平均值（平均值）。</bullet_item><para/>
        ///     <bullet_item>中位数 - 计算输入字段值的中位数（中间值）。</bullet_item><para/>
        ///     <bullet_item>模式 （Mode） - 使用频率最高的值。</bullet_item><para/>
        ///     <bullet_item>最小值 （Min） - 使用所有输入字段值的最小值。</bullet_item><para/>
        ///     <bullet_item>最大值 （Max） - 使用所有输入字段值的最大值。</bullet_item><para/>
        ///     <bullet_item>标准差 - 对所有输入字段值使用标准差分类方法。</bullet_item><para/>
        ///     <bullet_item>计数 （Count） - 查找计算中包含的记录数。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Map")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _field_mapping { get; set; } = null;


        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para><xdoc>
        ///   <para>Specifies the default storage parameters (configurations) for geodatabases in a relational database management system (RDBMS). This setting is applicable only when using enterprise geodatabase tables.</para>
        ///   <para>Configuration keywords are set by the database administrator.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定关系数据库管理系统 （RDBMS） 中地理数据库的默认存储参数（配置）。此设置仅在使用企业级地理数据库表时适用。</para>
        ///   <para>配置关键字由数据库管理员设置。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public FeatureClassToFeatureClass SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, bool? qualifiedFieldNames = null, bool? transferDomains = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, qualifiedFieldNames: qualifiedFieldNames, transferDomains: transferDomains, workspace: workspace);
            return this;
        }

    }

}